/**
 * Created by Administrator on 2016/5/11.
 */
$(function(){

    /**
     * @说明：明星专家
     * @作者：Daphne
     * @时间：2016-5-11
     * */
    var $starTitle = $('#mq_star_profession'),
        $starText = $('.mq_star_profess_popup li'),
        $close = $('.zq-close');
    /* 明星专家，弹出专家详情 */
    $starTitle.on('click','li',function(){
        $starText.eq($(this).index()).removeClass('f-dhid').siblings().addClass('f-dhid');
        $('html,body').addClass('f-overflow-y');
    });
    /* 关闭"明星专家"的弹框 */
    $close.on('click',function(){
        $starText.addClass('f-dhid');
        $('html,body').removeClass('f-overflow-y');
    });
    /*点击进入专业人士*/
    $('.profession-join').click(function(){
        aCookie('flg',false,'h12');
    });
    /*点击分页按钮-固定滚动条离顶部距离*/
    var $professionalInfo = $('.professionalInfo'),
        $pageBtn = $professionalInfo.find('.mq-page'),
        scrollH = $('.mq-search').offset().top;

    var tag = gCookie('flg');
    var temp = location.search.substr(1).split('&').pop();
    temp == 1 ? $(window).scrollTop(scrollH): tag == 'true' ? $(window).scrollTop(scrollH-15) : $(window).scrollTop(0);
    $pageBtn.click(function(){
        aCookie('flg',true,'h12');
    });
    var $searchList = $('#mq-search-list p');
    $searchList.on('click','span',function(){
        aCookie('flg',true,'h12');
    });
});









